package edu.sctu.practice.class01.liangyuxiang.work.text4;

/**
 * Created by Administrator on 2015/10/15.
 */
public class Number {
    private int number1;
    private int number2;

    public Number(int number1, int number2) {
        this.number1 = number1;
        this.number2 = number2;

    }

    //加法
    public int plus() {
        int sum = number1 + number2;
        System.out.println("两数之和:" + sum);
        return sum;
    }

    //减法
    public int reduce() {
        int reducing = number1 - number2;
        System.out.println("两数之差:" + reducing);
        return reducing;
    }

    //乘法
    public int times() {
        int times = number1 * number2;
        System.out.println("两数之积:" + times);
        return times;
    }

    //除法
    public int division() {
        int division = number1 / number2;
        System.out.println("两数相除:" + division);
        return division;
    }

}
